From: Camm Maguire Date: Sat, 27 Jun 2026 12:16:43 +0000 (+0000) Subject: [PATCH] X-Git-Tag: archive/raspbian/2.7.1-33+rpi1^2~4 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=311b596dc90f0fa43a7de385b3cdb26302c1be1c;p=gcl27.git [PATCH] TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. Gbp-Pq: Name Version_2_7_2pre33 --- diff --git a/cmpnew/gcl_cmpmain.lsp b/cmpnew/gcl_cmpmain.lsp index 5033c921..e0c289d3 100644 --- a/cmpnew/gcl_cmpmain.lsp +++ b/cmpnew/gcl_cmpmain.lsp @@ -555,8 +555,8 @@ Cannot compile ~a.~%" (namestring (merge-pathnames input-pathname *compiler-defa (with-open-file (st hn) (si::copy-stream st *standard-output*)) (when *disassemble-objdump* - (si::copy-stream (open (concatenate 'string "|objdump --source " (namestring on))) - *standard-output*)) + (with-open-file (s (concatenate 'string "|objdump --source " (namestring on))) + (si::copy-stream s *standard-output*))) (delete-file cn) (delete-file dn) (delete-file hn) diff --git a/configure b/configure index 6e8ab502..29b5e8ee 100755 --- a/configure +++ b/configure @@ -10369,11 +10369,7 @@ printf '%s\n' "$as_me: max log text start reduced to $max considering c stack ad # Need to get over default cstack and related maps between 0x1000000 and 0x2000000 if test "$use" == "386-gnu" || test "$use" == "amd64-gnu" ; then - if test "$use" == "386-gnu" ; then - q=24; - else - q=23; - fi + q=24; if test $min -lt $q && test $q -lt $max && test $q -lt 30; then min=$q { printf '%s\n' "$as_me:${as_lineno-$LINENO}: min log text start increased to $min over c stack address" >&5 diff --git a/configure.ac b/configure.ac index 2c783f30..fc0b5a51 100644 --- a/configure.ac +++ b/configure.ac @@ -1355,11 +1355,7 @@ if test "`cat gcl.script | wc -l`" != "0" ; then # Need to get over default cstack and related maps between 0x1000000 and 0x2000000 if test "$use" == "386-gnu" || test "$use" == "amd64-gnu" ; then - if test "$use" == "386-gnu" ; then - q=24; - else - q=23; - fi + q=24; if test $min -lt $q && test $q -lt $max && test $q -lt 30; then min=$q AC_MSG_NOTICE([min log text start increased to $min over c stack address]) diff --git a/git.tag b/git.tag index b3ec9ff6..c75be97a 100644 --- a/git.tag +++ b/git.tag @@ -1 +1 @@ -"Version_2_7_2pre32" +"Version_2_7_2pre33" diff --git a/h/amd64-gnu.h b/h/amd64-gnu.h index 6e00396d..54a852f7 100755 --- a/h/amd64-gnu.h +++ b/h/amd64-gnu.h @@ -1,10 +1,5 @@ #include "linux.h" -#define ADDITIONAL_FEATURES \ - ADD_FEATURE("BSD386"); \ - ADD_FEATURE("MC68020") - - #define I386 #define SGC @@ -21,3 +16,7 @@ #undef HAVE_D_TYPE /*FIXME defined, but not implemented in readdir*/ /* #define NO_FILE_LOCKING */ /*FIXME*/ + +#define ADDITIONAL_FEATURES ADD_FEATURE("NO-SIGFPE") + +#undef HAVE_FEENABLEEXCEPT diff --git a/h/notcomp.h b/h/notcomp.h index 7598d827..35646f40 100755 --- a/h/notcomp.h +++ b/h/notcomp.h @@ -20,7 +20,7 @@ EXTER int interrupt_flag,interrupt_enable; /* void sigint(),sigalrm(); */ -EXTER bool gc_enabled, saving_system; +EXTER bool gc_enabled, saving_system,leak_malloc_p; EXTER object lisp_package,user_package; EXTER char *core_end; @@ -28,7 +28,10 @@ EXTER int catch_fatal; EXTER long real_maxpage; EXTER char *this_lisp; -EXTER char stdin_buf[],stdout_buf[]; +#define EXTRA_BUFSIZE 8 +EXTER char stdin_buf[BUFSIZ + EXTRA_BUFSIZE]; +EXTER char stdout_buf[BUFSIZ + EXTRA_BUFSIZE]; +EXTER char stderr_buf[BUFSIZ + EXTRA_BUFSIZE]; EXTER object user_package; diff --git a/h/pool.h b/h/pool.h index 054cd1fe..bdb7e4b5 100644 --- a/h/pool.h +++ b/h/pool.h @@ -123,6 +123,7 @@ close_pool(void) { massert(!close(pool)); pool=-1; massert(!munmap(Pool,sizeof(struct pool))); + Pool=NULL; memset(gcl_pool,0,sizeof(gcl_pool)); no_recur=0; } diff --git a/h/protoize.h b/h/protoize.h index 687ccba8..f8f93144 100644 --- a/h/protoize.h +++ b/h/protoize.h @@ -1347,7 +1347,7 @@ object Icall_gen_error_handler(object,object,object,object,ufixnum,...); void * gcl_gmp_alloc(size_t); -void init_gmp_rnd_state(__gmp_randstate_struct *); +void init_gmp_rnd_state(__gmp_randstate_struct *,object); int my_plt(const char *,unsigned long *); @@ -1483,12 +1483,6 @@ fixnum elt_size(fixnum); fixnum elt_mode(fixnum); -void init_gmp_rnd_state(__gmp_randstate_struct *); - -/* void set_sgc_bit(struct pageinfo *,void *); */ - -void reinit_gmp(void); - object mod(object,object); void intdivrem(object,object,fixnum,object *,object *); @@ -1679,3 +1673,5 @@ void *mdlopen(const char *,int); void close_dlopen_list(void); void set_global_env_defaults(void); void disable_aslr(int,char **,char **); +void set_leak_malloc_on(void); +void set_leak_malloc_off(void); diff --git a/lsp/gcl_fpe.lsp b/lsp/gcl_fpe.lsp index e7f5ae54..92939f89 100644 --- a/lsp/gcl_fpe.lsp +++ b/lsp/gcl_fpe.lsp @@ -139,7 +139,8 @@ (feclearexcept x) (floating-point-error x (list* fun "unknown" name args) 0)))) (defun break-on-floating-point-exceptions - (&key suspend no-flush + (&rest all + &key suspend no-flush ,@(mapcar (lambda (x) `(,(car x) (logtest ,(caddr x) fpe-enabled))) +fe-list+) &aux r #+no-sigfpe(x (fetestexcept fpe-set))) (fe-enable @@ -154,7 +155,9 @@ (0))) +fe-list+)))))) #+no-sigfpe - (unless (or no-flush (zerop x)) (floating-point-error x 0 0)) + (unless (or no-flush (zerop x)) + (let ((y 'break-on-floating-point-exceptions)) + (floating-point-error x (list (symbol-function y) "unknown" y all) 0))) r)) (defun subclasses (class) diff --git a/o/alloc.c b/o/alloc.c index 75fe40ab..9d2b06b3 100644 --- a/o/alloc.c +++ b/o/alloc.c @@ -1696,28 +1696,76 @@ static char *baby_malloc(n) /* #endif */ bool writable_malloc=0; +bool leak_malloc_p=1; static void *malloc_pre_main_base,*malloc_pre_main_ptr,*malloc_pre_main_end; +void +set_leak_malloc_on(void) { + + leak_malloc_p=1; + +} + +void +set_leak_malloc_off(void) { + + leak_malloc_p=0; + malloc_pre_main_base=malloc_pre_main_ptr=malloc_pre_main_end=NULL; + +} + static void * -malloc_internal(size_t size) { +leak_malloc(size_t size) { - if (!msbrk_initialized()) { - static bool recursive_malloc; - unsigned long s=PAGESIZE; + unsigned long s=1<<14; - massert(!recursive_malloc); - recursive_malloc=1; - if (!malloc_pre_main_base) { - massert((malloc_pre_main_base=mmap(NULL,s,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0))!=(void *)-1); - malloc_pre_main_ptr=malloc_pre_main_base; - malloc_pre_main_end=malloc_pre_main_base+s; - } - massert(size<=(malloc_pre_main_end-malloc_pre_main_ptr)); - malloc_pre_main_ptr+=size; - recursive_malloc=0; - return malloc_pre_main_ptr-size; - } else - malloc_pre_main_base=malloc_pre_main_ptr=malloc_pre_main_end=NULL; + if (!malloc_pre_main_base) { + massert((malloc_pre_main_base=mmap(NULL,s,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0))!=(void *)-1); + malloc_pre_main_ptr=malloc_pre_main_base; + malloc_pre_main_end=malloc_pre_main_base+s; + } + + size=(size+sizeof(max_align_t)-1)&~(sizeof(max_align_t)-1); + massert(size<=(malloc_pre_main_end-malloc_pre_main_ptr)); + + malloc_pre_main_ptr+=size; + + return malloc_pre_main_ptr-size; + +} + +#define MALLOC_RETURN(_v) ({void *v=_v;recursive_malloc=0;return v;}) + +static void * +malloc_internal(size_t size) { + + static bool recursive_malloc; + + massert(!recursive_malloc); + recursive_malloc=1; + + /*GCL originally strove to capture all malloc memory in its heap to avoid interference + with its heap growth in limited address range contexts. While static linking is still + possible, in most environments there will be external shared libraries in the address + space, and this is beneficial from a system performance perspective in any case. GCL + goes to significant lengths to detect mmap_base and move it out of the way where possible + to allow for maximum contiguous heap growth (e.g. just under 3Gb on 32bit systems at + present). Linking against libX11 at a minimum will call malloc before main via + constructors in that library. Likewise dlopen of GCL's libboot.so will malloc early, + but after main. Such calls as these have no effective cleanup routines available before + exit, and furthermore write aslr random data therein foiling reproducibility if saved + in the heap. Such would be useless dead space on reexec if stored there in any case. + Traditionally we called gcl_init_alloc here, and this works, but it seems more advisable + to ring fence the aslr/shared library world into its own domain and store such mallocs + outside the heap in non-reclaimable memory (ie. leaked). At present leak_malloc is only + used for the dlopen of libboot.so which is critical for a reproducible build, but wrapping + all dlopen thus may be advisable someday. Right now the image dumps from raw image + runs, and from saved images with GCL_NO_TRUENAME set and in which the run just loads + .o files and saves are reproducible, which is sufficient for Debian gcl dependencies: + hol88,maxima,acl2,fricas and axiom. CM 20260625*/ + + if (leak_malloc_p) + MALLOC_RETURN(leak_malloc(size)); CHECK_INTERRUPT; @@ -1725,7 +1773,7 @@ malloc_internal(size_t size) { malloc_list->c.c_car->st.st_self = alloc_contblock(size); malloc_list->c.c_car->st.st_writable=writable_malloc; - return(malloc_list->c.c_car->st.st_self); + MALLOC_RETURN(malloc_list->c.c_car->st.st_self); } @@ -1742,7 +1790,7 @@ free(void *ptr) { object *p,pp; - if (ptr == 0 || ptr < data_start || ptr >= core_end) + if (ptr == 0 || ptr < data_start || ptr >= (void *)core_end) return; for (p = &malloc_list,pp=*p; pp && !endp(pp); p = &((pp)->c.c_cdr),pp=pp->c.c_cdr) diff --git a/o/cfun.c b/o/cfun.c index 1c7d0d15..eba5e3ae 100644 --- a/o/cfun.c +++ b/o/cfun.c @@ -86,13 +86,23 @@ close_dlopen_list(void) { void * mdlopen(const char *name,int flags) { - void *v=dlopen(name,flags); + + void *v; + char *err; + + set_leak_malloc_on(); + v=dlopen(name,flags); + set_leak_malloc_off(); + if ((err=dlerror())) + FEerror("dlopen failure on ~s: ~s",2,name,make_simple_string(err)); if (name) { object x=sSAdlopen_handlesA->s.s_dbind; for (;x!=Cnil && fix(x->c.c_car)!=(fixnum)v;x=x->c.c_cdr); if (x==Cnil) sSAdlopen_handlesA->s.s_dbind=MMcons(make_fixnum((fixnum)v),sSAdlopen_handlesA->s.s_dbind); + update_real_maxpage(); } + return v; } @@ -145,19 +155,11 @@ DEFUN("DLADDR",object,fSdladdr,SI,2,2,NONE,OI,OO,OO,OO,(fixnum ad,object n),"") DEFUN("DLOPEN",object,fSdlopen,SI,1,1,NONE,OO,OO,OO,OO,(object name),"") { - char *err; - void *v; - dlerror(); name=coerce_to_string(name); massert(snprintf(FN1,sizeof(FN1),"%-.*s",VLEN(name),name->st.st_self)>=0); - v=dlopen(strlen(FN1) ? FN1 : 0,RTLD_LAZY|RTLD_GLOBAL); - if ((err=dlerror())) - FEerror("dlopen failure on ~s: ~s",2,name,make_simple_string(err)); - update_real_maxpage(); - - RETURN1(make_fixnum((fixnum)v)); + RETURN1(make_fixnum((fixnum)mdlopen(strlen(FN1) ? FN1 : 0,RTLD_LAZY|RTLD_GLOBAL))); } diff --git a/o/error.c b/o/error.c index fa3e0d54..65557dcd 100644 --- a/o/error.c +++ b/o/error.c @@ -32,6 +32,13 @@ object siSuniversal_error_handler; object sSterminal_interrupt; +#if defined(__APPLE__) +char * +strerrordesc_np(int errnum) { + return (errnum >= 0 && errnum < sys_nerr) ? sys_errlist[errnum] : "Unknown error"; +} +#endif + void assert_error(const char *a,unsigned l,const char *f,const char *n) { @@ -40,7 +47,7 @@ assert_error(const char *a,unsigned l,const char *f,const char *n) { make_simple_string(a),make_fixnum(l), make_simple_string(f),make_simple_string(n),make_simple_string(strerror(errno))); else { - emsg("The assertion %s on line %d of %s in function %s failed: %s",a,l,f,n,strerror(errno)); + emsg("The assertion %s on line %d of %s in function %s failed: %s\n",a,l,f,n,strerrordesc_np(errno)); do_gcl_abort(); } diff --git a/o/gmp_big.c b/o/gmp_big.c index 42b55fc6..43955dd2 100644 --- a/o/gmp_big.c +++ b/o/gmp_big.c @@ -99,11 +99,9 @@ gcl_init_big1(void) { mp_set_memory_functions( gcl_gmp_alloc,gcl_gmp_realloc,gcl_gmp_free); jmp_gmp=0; -#if __GNU_MP_VERSION > 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR >= 2) Mersenne_Twister_Generator_Noseed.b=__gmp_randget_mt; Mersenne_Twister_Generator_Noseed.c=__gmp_randclear_mt; Mersenne_Twister_Generator_Noseed.d=__gmp_randiset_mt; -#endif } diff --git a/o/main.c b/o/main.c index 5285df7a..9ac5f038 100644 --- a/o/main.c +++ b/o/main.c @@ -68,11 +68,6 @@ bool saving_system=FALSE; char *system_directory; -#define EXTRA_BUFSIZE 8 -char stdin_buf[BUFSIZ + EXTRA_BUFSIZE]; -char stdout_buf[BUFSIZ + EXTRA_BUFSIZE]; -char stderr_buf[BUFSIZ + EXTRA_BUFSIZE]; - #include "stacks.h" int debug; /* debug switch */ @@ -569,42 +564,47 @@ dir_name_length(const char *s) { } int initializing_boot=0; +int in_pre_gcl=0; void init_boot(void) { - char *sysd=getenv("GCL_SYSDIR"),*d=sysd ? sysd : kcl_self; + if (raw_image||in_pre_gcl) { + + char *sysd=getenv("GCL_SYSDIR"),*d=sysd ? sysd : kcl_self; #ifdef USE_LIBBOOT - void *v,*q; + void *v,*q; #endif - char *z,*s="libboot.so"; - size_t m=sysd ? strlen(sysd) : dir_name_length(kcl_self),n=m+strlen(s)+1; - object omp=sSAoptimize_maximum_pagesA->s.s_dbind; + char *z,*s="libboot.so"; + size_t m=sysd ? strlen(sysd) : dir_name_length(kcl_self),n=m+strlen(s)+1; + object omp=sSAoptimize_maximum_pagesA->s.s_dbind; - sSAoptimize_maximum_pagesA->s.s_dbind=Cnil; - z=alloca(n); - snprintf(z,n,"%-*.*s%s",(int)m,(int)m,d,s); + sSAoptimize_maximum_pagesA->s.s_dbind=Cnil; + z=alloca(n); + snprintf(z,n,"%-*.*s%s",(int)m,(int)m,d,s); #ifdef USE_LIBBOOT - if (!(v=mdlopen(z,RTLD_LAZY|RTLD_GLOBAL))) - printf("%s\n",dlerror()); - if (!(q=dlsym(v,"gcl_init_boot"))) - printf("%s\n",dlerror()); + if (!(v=mdlopen(z,RTLD_LAZY|RTLD_GLOBAL))) + printf("%s\n",dlerror()); + if (!(q=dlsym(v,"gcl_init_boot"))) + printf("%s\n",dlerror()); #endif - initializing_boot=1; + initializing_boot=1; #ifndef USE_LIBBOOT - { - extern void gcl_init_boot(void); - gcl_init_boot(); - } + { + extern void gcl_init_boot(void); + gcl_init_boot(); + } #else - ((void (*)())q)(); + ((void (*)())q)(); #endif - initializing_boot=0; - sSAoptimize_maximum_pagesA->s.s_dbind=omp; + initializing_boot=0; + sSAoptimize_maximum_pagesA->s.s_dbind=omp; + } + + set_leak_malloc_off(); } -int in_pre_gcl=0; object def_env1[2]={(object)1,Cnil},*def_env=def_env1+1; object src_env1[2]={(object)1,Cnil},*src_env=src_env1+1; @@ -732,7 +732,7 @@ main(int argc, char **argv, char **envp) { ARGC = argc; ARGV = argv; ENVP = envp; - + if (raw_image) { printf("GCL (GNU Common Lisp) %s %ld pages\n",LISP_IMPLEMENTATION_VERSION,real_maxpage); @@ -761,7 +761,7 @@ main(int argc, char **argv, char **envp) { __stack_chk_guard=random_ulong();/*Cannot be safely set inside a function which returns*/ #endif - if (in_pre_gcl) init_boot(); + init_boot(); } diff --git a/o/num_rand.c b/o/num_rand.c index 6355c4f1..6c39c76e 100644 --- a/o/num_rand.c +++ b/o/num_rand.c @@ -84,7 +84,6 @@ rando(object x, object rs) { #define RS_DEF_INIT 0 #endif -#if __GNU_MP_VERSION > 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR >= 2) extern void * (*gcl_gmp_allocfun) (size_t); static void * (*old_gcl_gmp_allocfun) (size_t); static void * trap_result; @@ -103,52 +102,44 @@ trap_gcl_gmp_allocfun(size_t size){ } } -#endif void reinit_gmp() { -#if __GNU_MP_VERSION > 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR >= 2) Mersenne_Twister_Generator_Noseed.b=__gmp_randget_mt; Mersenne_Twister_Generator_Noseed.c=__gmp_randclear_mt; Mersenne_Twister_Generator_Noseed.d=__gmp_randiset_mt; -#endif } void -init_gmp_rnd_state(__gmp_randstate_struct *x) { +init_gmp_rnd_state(__gmp_randstate_struct *x,object rs) { static int n; bzero(x,sizeof(*x)); -#if __GNU_MP_VERSION > 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR >= 2) -/* if (!trap_size) { */ old_gcl_gmp_allocfun=gcl_gmp_allocfun; gcl_gmp_allocfun=trap_gcl_gmp_allocfun; -/* } */ -#endif gmp_randinit_default(x); -#if __GNU_MP_VERSION > 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR >= 2) if (!n) { if (x->_mp_seed->_mp_d!=trap_result) FEerror("Unknown pointer in rnd_state!",0); -/* #ifndef __hppa__ /\*FIXME*\/ */ -/* if (((gmp_randfnptr_t *)x->_mp_algdata._mp_lc)->b!=Mersenne_Twister_Generator_Noseed.b || */ -/* ((gmp_randfnptr_t *)x->_mp_algdata._mp_lc)->c!=Mersenne_Twister_Generator_Noseed.c || */ -/* ((gmp_randfnptr_t *)x->_mp_algdata._mp_lc)->d!=Mersenne_Twister_Generator_Noseed.d) */ -/* FEerror("Unknown pointer data in rnd_state!",0); */ -/* #endif */ n=1; } gcl_gmp_allocfun=old_gcl_gmp_allocfun; x->_mp_seed->_mp_alloc=x->_mp_seed->_mp_size=trap_size; -#endif - + + if (rs == Ct) + gmp_randseed_ui(x,RS_DEF_INIT); + else if (type_of(rs)==t_random) + memcpy(x->_mp_seed->_mp_d,rs->rnd.rnd_state._mp_seed->_mp_d, + rs->rnd.rnd_state._mp_seed->_mp_alloc*sizeof(*x->_mp_seed->_mp_d)); + + x->_mp_algdata._mp_lc=&Mersenne_Twister_Generator_Noseed; } @@ -168,18 +159,8 @@ make_random_state(object rs) { } z = alloc_object(t_random); - init_gmp_rnd_state(&z->rnd.rnd_state); + init_gmp_rnd_state(&z->rnd.rnd_state,rs); - - if (rs == Ct) - gmp_randseed_ui(&z->rnd.rnd_state,RS_DEF_INIT); - else - memcpy(z->rnd.rnd_state._mp_seed->_mp_d,rs->rnd.rnd_state._mp_seed->_mp_d, - rs->rnd.rnd_state._mp_seed->_mp_alloc*sizeof(*z->rnd.rnd_state._mp_seed->_mp_d)); - -#if __GNU_MP_VERSION > 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR >= 2) - z->rnd.rnd_state._mp_algdata._mp_lc=&Mersenne_Twister_Generator_Noseed; -#endif return(z); } diff --git a/o/read.d b/o/read.d index 10ca9a3b..4cfd18bd 100644 --- a/o/read.d +++ b/o/read.d @@ -1636,10 +1636,7 @@ Lsharp_dollar_reader() x = read_object(vs_base[0]); tx=type_of(x); vs_base[0] = alloc_object(t_random); - init_gmp_rnd_state(&vs_base[0]->rnd.rnd_state); -#if __GNU_MP_VERSION > 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR >= 2) - vs_base[0]->rnd.rnd_state._mp_algdata._mp_lc=&Mersenne_Twister_Generator_Noseed; -#endif + init_gmp_rnd_state(&vs_base[0]->rnd.rnd_state,Cnil); if (tx!=t_fixnum || fix(x)) { if (tx==t_fixnum) { if (vs_base[0]->rnd.rnd_state._mp_seed->_mp_size!=1) diff --git a/o/save.c b/o/save.c index 0b68afcf..0eb056cb 100644 --- a/o/save.c +++ b/o/save.c @@ -34,9 +34,15 @@ LFD(siLsave)(void) { /*FIXME clean this up when done*/ + set_leak_malloc_on(); + set_global_env_defaults(); shared_lib_start=NULL; + memset(&fcall,0,sizeof(fcall)); memset(gmp_jmp,0,sizeof(gmp_jmp)); + memset(stdin_buf,0,sizeof(stdin_buf)); + memset(stdout_buf,0,sizeof(stdout_buf)); + memset(stderr_buf,0,sizeof(stderr_buf)); memset(frs_org,0,(frs_limit-frs_org)*sizeof(*frs_org)); memset(bds_org,0,(bds_limit-bds_org)*sizeof(*bds_org)); memset(ihs_org,0,(ihs_limit-ihs_org)*sizeof(*ihs_org)); diff --git a/o/usig.c b/o/usig.c index 3d2dff23..abd2e648 100644 --- a/o/usig.c +++ b/o/usig.c @@ -155,7 +155,7 @@ DEFUN("FEENABLEEXCEPT",object,fSfeenableexcept,SI,1,1,NONE,II,OO,OO,OO,(fixnum x x=feenableexcept(x); -#elif defined(__x86_64__) || defined(__i386__) +#elif (defined(__x86_64__) && !defined(__gnu_hurd__)) || defined(__i386__) #define ASM __asm__ __volatile__ { volatile unsigned short s=0; @@ -194,7 +194,7 @@ DEFUN("FEDISABLEEXCEPT",object,fSfedisableexcept,SI,0,0,NONE,IO,OO,OO,OO,(void), /* feclearexcept(FE_ALL_EXCEPT); */ x=fedisableexcept(FE_ALL_EXCEPT); -#elif defined(__x86_64__) || defined(__i386__) +#elif (defined(__x86_64__) && !defined(__gnu_hurd__)) || defined(__i386__) #define ASM __asm__ __volatile__ { volatile unsigned int i=0;